package com.lee.adapter.service.impl;

import com.lee.adapter.controller.SimpleController;
import com.lee.adapter.service.HandlerAdapter;

/**
 * @author zfl_a
 * @date 2020/8/16
 * @project springboot_design_pattern
 */
public class SimpleHandlerAdapter implements HandlerAdapter {

    @Override
    public boolean supports(Object handler) {
        return handler instanceof SimpleController;
    }

    @Override
    public String handle(Object handler)  {
        return ((SimpleController)handler).doSimple();
    }
}
